package com.peng.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.function.Consumer;

@Controller
public class ControllerTest {
    @GetMapping("/hello")
    public String hello(Model model){
        model.addAttribute("msg","<h1>hello,world</h1>");
        model.addAttribute("users", Arrays.asList("jing","kuang"));
        return "test";
    }


}
